package cn.iocoder.yudao.framework.business.eligibility.service;

import cn.iocoder.yudao.framework.business.basic.dao.query.CoreQueryWrapper;
import cn.iocoder.yudao.framework.business.basic.service.impl.MemberScopeService;
import cn.iocoder.yudao.framework.business.eligibility.pojo.form.AdminEligibilityUserQueryDTO;
import cn.iocoder.yudao.framework.business.eligibility.pojo.po.EligibilityUserEntity;
import cn.iocoder.yudao.framework.business.eligibility.pojo.vo.EligibilityUserVO;
import jakarta.annotation.Nonnull;

/**
 * 用户身份资格 Service 实现类
 *
 * @author 山野羡民
 */
//@org.springframework.stereotype.Service
public abstract class AdminEligibilityBaseService<DO extends EligibilityUserEntity, RESP extends EligibilityUserVO, QUERY extends AdminEligibilityUserQueryDTO> extends MemberScopeService<DO, RESP, QUERY> {

    @Nonnull
    @Override
    protected CoreQueryWrapper<DO> buildQueryWrapper(QUERY param) {
        CoreQueryWrapper<DO> wrapper = super.buildQueryWrapper(param);
        if (param == null) {
            return wrapper;
        }
        wrapper.betweenIfPresent("expire_time", param.getExpireTime());
        return wrapper;
    }

}